//
//  RootViewController.m
//  ShoppingCompare
//
//  Created by Wenjie on 11-5-12.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "RootViewController.h"
#import "Search.h"

@implementation RootViewController

- (void)applicationDidFinishLaunching:(UIApplication *)application {
	
	// Get value --------------------------------------
	taobaoKey = @"12201364";
	taobaoSecret = @"89ec79f08a30ab437e0c8e8fc05d8349";
	taobaoURL = @"http://gw.api.taobao.com/router/rest";
	
	isAdv = YES;
	inTaobao = YES;
	key = @"";
	trans = YES;
	minP = -1l;
	maxP = -1l;
	order = 0l;
	pageNo = 0l;
	total = 0l;
	//item = [[ItemList alloc] init];

	items = [[NSMutableArray alloc] init];
	listItems = [[NSMutableArray alloc] init];
	resultData = [[[NSData alloc] init] autorelease];

	// Building UI --------------------------------------
	window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	search = [[Search alloc] init];
	UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:search];	
	[window addSubview:navigationController.view];
	[window makeKeyAndVisible];
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc. that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end